#pragma once

#include <atlimage.h>

class CMyAtlImage
	: public ATL::CImage
{
public:
	CMyAtlImage(void);
	~CMyAtlImage(void);

	BOOL LoadPNG( LPCTSTR pszFileName );

	void SetBackColor( COLORREF color );

	BOOL IsHaveAlphaChannel();

public:
	static void PNGImageAlpha( CImage* pPngImg );
	static void SetImageBackColor( CImage* img,COLORREF color );
	static void CopyPixel(CImage* pDst,CPoint pointDst,CImage* pSrc,CRect rcSrc);
	static BYTE GetAlpha(CImage* pImg,int x,int y);
	static void SetAlpha(CImage* pImg,int x,int y,BYTE a);
};
